A GOTO statement moves to a specific location within a calculation. The location has been named with a label. (See Assignment Statements for more information.) A GOTO statement must begin with the keyword GOTO.
Here is an example:
GOTO SECTION_ONE:
The control jumps to SECTION_ONE in a calculation.
The destination label can occur anywhere in the script containing the GOTO statement. If the label cannot be located in the script, a syntax error will be generated.
GOTO will support retrieving the label from a target variable. Here is an example:
SECTION = "MY_LABEL:"
GOTO SECTION
Since the word following the GOTO statement does not contain a colon, the program will assume the label is contained in the target variable named. In this case, control will jump to the location of MY_LABEL in the current script.
© Copyright 2015, Oracle and/or its affiliates. All rights reserved. Legal notices.